# modify the prefix
# set -g prefix C-a
# unbind C-b
# modify the escape-time to 1ms, speed up the reponse 
set -sg escape-time 1
# set the window-base
set -g base-index 1
# set the pane-base
setw -g pane-base-index 1
# reset ~/.tmux.conf 
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# send-prefix to other program
bind C-a send-prefix
# split the pane
bind | split-window -h
bind - split-window -v
# set the move using vim-style
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# switch the window
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# set the size of pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# set the color mode of tmux
set -g default-terminal "screen-256color"
# setting the status bar
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"
# setting the fresh interval
set -g status-interval 60
# setting the utf-8 support
set -g status-utf8 on
# let window-list on center
set -g status-justify centre
# enable the notification of window-activity
setw -g monitor-activity on
set -g visual-activity on

# enable the vi mode
setw -g mode-keys vi
# short-cut key for copy mode
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# use xclip with tmux in linux
bind C-c run "tmux save-buffer - | xlip -i -sel clipboard"
bind C-v run "tmux set buffer \"$(xlip -o -sel clipboard)\"; tmux paste-buffer"
